<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <list />
    <textarea
      name=""
      id=""
      cols="30"
      rows="10"
      placeholder="请输入评论内容"
      v-model="content"
    ></textarea>
    <button @click="ADD(content)">添加显示评论</button>
  </div>
</template>

<script>
import list from "@/components/HelloWorld.vue";
import { mapActions } from "vuex";

export default {
  name: "HomeView",
  data() {
    return {
      content: "",
    };
  },
  methods: {
    ...mapActions(["ADD"]),
  },
  components: {
    list,
  },
};
</script>
